/**
 * @autor my
 * 2017/8/17.
 */
public class Demo {
    public static void main(String[] args) {
        Person person=new Teacher();
        person.setName("老师");
        Person person1=new Engineer();
        person1.setName("攻城狮");
        Person person2=new Doctor();
        person2.setName("医生");
        Person person3=new Journalist();
        person3.setName("记者");
        //记者调用interview方法分别采访各个职业
        System.out.println("我是："+person.getName()+",我觉得");
        person.opinionToProfession();
        System.out.println("我是："+person1.getName()+",我觉得");
        person1.opinionToProfession();
        System.out.println("我是："+person2.getName()+",我觉得");
        person2.opinionToProfession();
        System.out.println("我是："+person3.getName()+",我觉得");
        person3.opinionToProfession();
    }
}
